/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:44 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DonviquanlyEntity
    {
        public DonviquanlyEntity()
        {
			m_pk_idonviquanlyid=0;
			m_stendonviquanly="";
			m_sdiachi="";
			m_ssodienthoai="";
			m_fk_ithutruongid=0;
			m_schucvuthutruong="";
        }
		private Int64 m_pk_idonviquanlyid;
		public Int64 PK_iDonviquanlyID
		{
			get { return m_pk_idonviquanlyid ; }
			set { m_pk_idonviquanlyid = value; }
		}
		private String m_stendonviquanly;
		public String sTendonviquanly
		{
			get { return m_stendonviquanly ; }
			set { m_stendonviquanly = value; }
		}
		private String m_sdiachi;
		public String sDiachi
		{
			get { return m_sdiachi ; }
			set { m_sdiachi = value; }
		}
		private String m_ssodienthoai;
		public String sSodienthoai
		{
			get { return m_ssodienthoai ; }
			set { m_ssodienthoai = value; }
		}
		private Int64 m_fk_ithutruongid;
		public Int64 FK_iThutruongID
		{
			get { return m_fk_ithutruongid ; }
			set { m_fk_ithutruongid = value; }
		}
		private String m_schucvuthutruong;
		public String sChucvuthutruong
		{
			get { return m_schucvuthutruong ; }
			set { m_schucvuthutruong = value; }
		}
        private String m_slogo;
        public String sLogo
        {
            get { return m_slogo; }
            set { m_slogo = value; }
        }
        #region Comparison
        public static List<DonviquanlyEntity> Sort(List<DonviquanlyEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DonviquanlyEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DonviquanlyEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DonviquanlyEntity> COMPARISON_PK_iDonviquanlyID
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.PK_iDonviquanlyID.CompareTo(other.PK_iDonviquanlyID);
				};
			}
		}
		public static Comparison<DonviquanlyEntity> COMPARISON_sTendonviquanly
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.sTendonviquanly.CompareTo(other.sTendonviquanly);
				};
			}
		}
		public static Comparison<DonviquanlyEntity> COMPARISON_sDiachi
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.sDiachi.CompareTo(other.sDiachi);
				};
			}
		}
		public static Comparison<DonviquanlyEntity> COMPARISON_sSodienthoai
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.sSodienthoai.CompareTo(other.sSodienthoai);
				};
			}
		}
		public static Comparison<DonviquanlyEntity> COMPARISON_FK_iThutruongID
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.FK_iThutruongID.CompareTo(other.FK_iThutruongID);
				};
			}
		}
		public static Comparison<DonviquanlyEntity> COMPARISON_sChucvuthutruong
		{
			get
			{
				return delegate(DonviquanlyEntity entity,DonviquanlyEntity other)
				{
					return entity.sChucvuthutruong.CompareTo(other.sChucvuthutruong);
				};
			}
		}
        public static Comparison<DonviquanlyEntity> COMPARISON_sLogo
        {
            get
            {
                return delegate(DonviquanlyEntity entity, DonviquanlyEntity other)
                {
                    return entity.sLogo.CompareTo(other.sLogo);
                };
            }
        }
        #endregion
    }
}
